home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / Finder.p < prev    next >
Encoding:
Text File  |  1998-02-12  |  5.9 KB  |  204 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Finder.p
  3.  
  4.      Contains:    Finder flags and container types.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.1
  8.  
  9.      Copyright:    © 1990-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT Finder;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __FINDER__}
  28. {$SETC __FINDER__ := 1}
  29.  
  30. {$I+}
  31. {$SETC FinderIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __MACTYPES__}
  35. {$I MacTypes.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __QUICKDRAW__}
  38. {$I Quickdraw.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __EVENTS__}
  41. {$I Events.p}
  42. {$ENDC}
  43.  
  44.  
  45. {$PUSH}
  46. {$ALIGN MAC68K}
  47. {$LibExport+}
  48.  
  49.  
  50. CONST
  51.     kCustomIconResource            = -16455;                        {  Custom icon family resource ID  }
  52.  
  53.     kContainerFolderAliasType    = 'fdrp';                        {  type for folder aliases  }
  54.     kContainerTrashAliasType    = 'trsh';                        {  type for trash folder aliases  }
  55.     kContainerHardDiskAliasType    = 'hdsk';                        {  type for hard disk aliases  }
  56.     kContainerFloppyAliasType    = 'flpy';                        {  type for floppy aliases  }
  57.     kContainerServerAliasType    = 'srvr';                        {  type for server aliases  }
  58.     kApplicationAliasType        = 'adrp';                        {  type for application aliases  }
  59.     kContainerAliasType            = 'drop';                        {  type for all other containers  }
  60.                                                                 {  types for Special folder aliases  }
  61.     kSystemFolderAliasType        = 'fasy';
  62.     kAppleMenuFolderAliasType    = 'faam';
  63.     kStartupFolderAliasType        = 'fast';
  64.     kPrintMonitorDocsFolderAliasType = 'fapn';
  65.     kPreferencesFolderAliasType    = 'fapf';
  66.     kControlPanelFolderAliasType = 'fact';
  67.     kExtensionFolderAliasType    = 'faex';                        {  types for AppleShare folder aliases  }
  68.     kExportedFolderAliasType    = 'faet';
  69.     kDropFolderAliasType        = 'fadr';
  70.     kSharedFolderAliasType        = 'fash';
  71.     kMountedFolderAliasType        = 'famn';
  72.  
  73.                                                                 {  Finder Flags  }
  74.     kIsOnDesk                    = $0001;
  75.     kColor                        = $000E;
  76.     kIsShared                    = $0040;                        {  bit 0x0080 is hasNoINITS  }
  77.     kHasBeenInited                = $0100;                        {  bit 0x0200 was the letter bit for AOCE, but is now reserved for future use  }
  78.     kHasCustomIcon                = $0400;
  79.     kIsStationery                = $0800;
  80.     kNameLocked                    = $1000;
  81.     kHasBundle                    = $2000;
  82.     kIsInvisible                = $4000;
  83.     kIsAlias                    = $8000;
  84.  
  85. {$IFC OLDROUTINENAMES }
  86.     kIsStationary                = $0800;
  87.  
  88. {$ENDC}  {OLDROUTINENAMES}
  89.  
  90. {    
  91.     The following declerations used to be in Files.≈, 
  92.     but are Finder specific and were moved here.
  93. }
  94.                                                                 {  Finder Constants  }
  95.     fOnDesk                        = 1;
  96.     fHasBundle                    = 8192;
  97.     fTrash                        = -3;
  98.     fDesktop                    = -2;
  99.     fDisk                        = 0;
  100.  
  101.  
  102. TYPE
  103.     FInfoPtr = ^FInfo;
  104.     FInfo = RECORD
  105.         fdType:                    OSType;                                    { the type of the file }
  106.         fdCreator:                OSType;                                    { file's creator }
  107.         fdFlags:                UInt16;                                    { flags ex. hasbundle,invisible,locked, etc. }
  108.         fdLocation:                Point;                                    { file's location in folder }
  109.         fdFldr:                    INTEGER;                                { folder containing file }
  110.     END;
  111.  
  112.     FXInfoPtr = ^FXInfo;
  113.     FXInfo = RECORD
  114.         fdIconID:                INTEGER;                                { Icon ID }
  115.         fdUnused:                ARRAY [0..2] OF INTEGER;                { unused but reserved 6 bytes }
  116.         fdScript:                SInt8;                                    { Script flag and number }
  117.         fdXFlags:                SInt8;                                    { More flag bits }
  118.         fdComment:                INTEGER;                                { Comment ID }
  119.         fdPutAway:                LONGINT;                                { Home Dir ID }
  120.     END;
  121.  
  122.     DInfoPtr = ^DInfo;
  123.     DInfo = RECORD
  124.         frRect:                    Rect;                                    { folder rect }
  125.         frFlags:                UInt16;                                    { Flags }
  126.         frLocation:                Point;                                    { folder location }
  127.         frView:                    INTEGER;                                { folder view }
  128.     END;
  129.  
  130.     DXInfoPtr = ^DXInfo;
  131.     DXInfo = RECORD
  132.         frScroll:                Point;                                    { scroll position }
  133.         frOpenChain:            LONGINT;                                { DirID chain of open folders }
  134.         frScript:                SInt8;                                    { Script flag and number }
  135.         frXFlags:                SInt8;                                    { More flag bits }
  136.         frComment:                INTEGER;                                { comment }
  137.         frPutAway:                LONGINT;                                { DirID }
  138.     END;
  139.  
  140.  
  141. { Values of the 'message' parameter to a Control Panel 'cdev' }
  142.  
  143. CONST
  144.     initDev                        = 0;                            { Time for cdev to initialize itself }
  145.     hitDev                        = 1;                            { Hit on one of my items }
  146.     closeDev                    = 2;                            { Close yourself }
  147.     nulDev                        = 3;                            { Null event }
  148.     updateDev                    = 4;                            { Update event }
  149.     activDev                    = 5;                            { Activate event }
  150.     deactivDev                    = 6;                            { Deactivate event }
  151.     keyEvtDev                    = 7;                            { Key down/auto key }
  152.     macDev                        = 8;                            { Decide whether or not to show up }
  153.     undoDev                        = 9;
  154.     cutDev                        = 10;
  155.     copyDev                        = 11;
  156.     pasteDev                    = 12;
  157.     clearDev                    = 13;
  158.     cursorDev                    = 14;
  159.  
  160.  
  161. { Special values a Control Panel 'cdev' can return }
  162.     cdevGenErr                    = -1;                            { General error; gray cdev w/o alert }
  163.     cdevMemErr                    = 0;                            { Memory shortfall; alert user please }
  164.     cdevResErr                    = 1;                            { Couldn't get a needed resource; alert }
  165.     cdevUnset                    = 3;                            {  cdevValue is initialized to this }
  166.  
  167. { Control Panel Default Proc }
  168.  
  169. TYPE
  170. {$IFC TYPED_FUNCTION_POINTERS}
  171.     ControlPanelDefProcPtr = FUNCTION(message: INTEGER; item: INTEGER; numItems: INTEGER; cPanelID: INTEGER; VAR theEvent: EventRecord; cdevValue: LONGINT; cpDialog: DialogPtr): LONGINT;
  172. {$ELSEC}
  173.     ControlPanelDefProcPtr = ProcPtr;
  174. {$ENDC}
  175.  
  176.     ControlPanelDefUPP = UniversalProcPtr;
  177.  
  178. CONST
  179.     uppControlPanelDefProcInfo = $000FEAB0;
  180.  
  181. FUNCTION NewControlPanelDefProc(userRoutine: ControlPanelDefProcPtr): ControlPanelDefUPP;
  182.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  183.     INLINE $2E9F;
  184.     {$ENDC}
  185.  
  186. FUNCTION CallControlPanelDefProc(message: INTEGER; item: INTEGER; numItems: INTEGER; cPanelID: INTEGER; VAR theEvent: EventRecord; cdevValue: LONGINT; cpDialog: DialogPtr; userRoutine: ControlPanelDefUPP): LONGINT;
  187.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  188.     INLINE $205F, $4E90;
  189.     {$ENDC}
  190.  
  191.  
  192.  
  193.  
  194. {$ALIGN RESET}
  195. {$POP}
  196.  
  197. {$SETC UsingIncludes := FinderIncludes}
  198.  
  199. {$ENDC} {__FINDER__}
  200.  
  201. {$IFC NOT UsingIncludes}
  202.  END.
  203. {$ENDC}
  204.